const layer = layui.layer
axios.get('/my/article/cates').then(({ data: { data } }) => {
  const htmlStr = data.map(({ name, alias }) =>
    `<tr>
        <td>${name}</td>
        <td>${alias}</td>
        <td>
          <button type="button" class="layui-btn layui-btn-xs btn_edit">编辑</button>
          <button type="button" class="layui-btn layui-btn-xs layui-btn-danger btn_delete">删除</button>
        </td>
      </tr>`).join('')
  $("#tbody").html(htmlStr)
})
$("#btnAddCate").click(function () {
  const index = layer.open({
    content: '哈哈',
    type: 1,
    title: '添加文章类别',
    area: ['500px', '250px']
  });
})